package com.forenow.demo5;

public class TestSingleton {
    //常量
    public static final String NAME="tom";
    public static void main(String[] args) {
      Singleton singleton=Singleton.getInstance();
      singleton.setName(TestSingleton.NAME);
        System.out.println(singleton.getName());

        Singleton sin = Singleton.getInstance();
        sin.setName("jzy");
        System.out.println(singleton.getName());
    }
}
